package model;

import java.util.Random;

/**
 * 
 * @author kagioglu
 */
class RandomMapFactory
{
    public static GameMap make( int x, int y )
    {
        Random random = new Random();
        TerrainType[] ttypes = TerrainType.values();
        GameMap gmap = new GameMap( x, y );
        for ( int i = 0; i < x; i++ )
        {
            for ( int j = 0; j < y; j++ )
            {
                gmap.setTile( i, j, new Tile( ttypes[ random.nextInt( ttypes.length ) ],
                        ResourceType.NONE, 0, null ) );
            }
        }
        return gmap;
    }
}
